﻿using Architecture.Repository;
using Architecture.Repository.Impl;
using Architecture.Repository.Interface;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Architecture.Domain.Service.ProvinceServices
{
    public class ProvinceService : IProvinceService
    {
        /// <summary>
        /// 省仓储接口
        /// </summary>
        protected readonly IProvinceRepository _provinceRepository;

        /// <summary>
        /// 构造函数
        /// </summary>
        /// <param name="provinceRepository">省仓储接口</param>
        public ProvinceService(IProvinceRepository provinceRepository)
        {
            _provinceRepository = provinceRepository;
        }

        public async Task<List<Province>> GetListProvincesAsync()
        {
            return await _provinceRepository.GetAllAsync();
        }
    }
}
